﻿@model ShivamEMR.Web.Areas.Patient.ViewModels.AdmissionViewModel

@{
    ViewBag.Title = "NewInPatient";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>NewInPatient</h2>


 
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm(FormMethod.Post))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Admission</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.Admission.AdmissionDateAndTime)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Admission.AdmissionDateAndTime)
            @Html.ValidationMessageFor(model => model.Admission.AdmissionDateAndTime)
        </div>
     
        <div class="editor-label">
            ReferredBy
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Admission.ReferredByID, ((IEnumerable<ShivamEMR.Model.Domain.DoctorsDomain.Doctor>)ViewBag.PossibleReferredBies).Select(option => new SelectListItem
{
    Text = (option == null ? "None" : option.FullName),
    Value = option.ID.ToString(),
    Selected = (Model != null) && (option.ID == Model.Admission.ReferredByID)
}), "Choose...")
            @Html.ValidationMessageFor(model => model.Admission.ReferredByID)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Admission.ReferrerNotes)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Admission.ReferrerNotes)
            @Html.ValidationMessageFor(model => model.Admission.ReferrerNotes)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Admission.Notes)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Admission.Notes)
            @Html.ValidationMessageFor(model => model.Admission.Notes)
        </div>
        <div class="editor-label">
            Assigned To
        </div>
        <div class="editor-field" id="assignedData">
            @Html.DropDownListFor(model => model.AssignedToID, ((IEnumerable<ShivamEMR.Model.Domain.CompanyDomain.Employee>)ViewBag.PossibleEmployees).Select(option => new SelectListItem
{
    Text = (option == null ? "None" : option.FullName),
    Value = option.ID.ToString(),
    Selected = (Model != null) && (option.ID == Model.AssignedToID)
}), "Choose...", new { @multiple = "multiple" })
            @Html.ValidationMessageFor(model => model.AssignedToID)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to Dashboard", "PDashboard", "Patient")
</div>

